import React from 'react'
import {Menu} from 'antd'

const LeftMenu = ({students, studentId, handleClick}) => (
  <Menu
    selectedKeys={[`${studentId}`]}
    onClick={handleClick}
    mode='inline'>
    {students.map((item) =>
            (<Menu.Item key={item.student.id}>
              <span>{item.student.name}@({item.student.username})</span>
            </Menu.Item>))}
  </Menu>
)

export default LeftMenu
